home *** CD-ROM | disk | FTP | other *** search
- 10 'NAMES3.BAS - Read in ten names from a disk file and store in memory
- 20 'From the GWBT06 Basic Tutorial Series 11/15/1990
- 30 '
- 40 'Variables used:
- 50 DIM NAMES$(10)
- 60 '
- 70 'Start of Main Program:
- 80 OPEN "NAMES.TXT" FOR INPUT AS #1
- 90 FOR NAMES=1 TO 10
- 100 INPUT #1,NAMES$(NAMES)
- 110 NEXT NAMES
- 120 CLOSE #1
- 130 'Names read in, now let's print them to the screen and get a choice...
- 140 CLS
- 150 FOR NAMES=1 TO 10
- 160 PRINT USING "## - \ \";NAMES,NAMES$(NAMES)
- 170 NEXT NAMES
- 180 PRINT
- 250 INPUT "Enter a number from 1 to 10 for the desired name";NAMENUMBER
- 260 PRINT "Your selected name is: ";NAMES$(NAMENUMBER)
- 270 END
- 280 'End of program - NAME1.BAS